/* Choisir l'amplitude des coefficients pris par les fractions rationnelles */
mmax:3;
for a:1 thru mmax do 
/* =============================================================== */
/* Corps du programme */
(display(a),
for b:-mmax thru mmax do 
for c:-mmax thru mmax do 
for d:-mmax thru mmax do 
for e:-mmax thru mmax do 
for f:-mmax thru mmax do 
for g:-mmax thru mmax do 
for h:-mmax thru mmax do 
block(if (c=0) or (g=0) then go(loop),
if (c*h-d*g=0) then go(loop),
m:(a*x+b)/(c*x+d)-(e*x+f)/(g*x+h),
n:factor(m),
q:num(n),
if (atom(q)) then go(loop),
if (not(cequal(part(q,0),"^"))) then go(loop),
print("  ",(a*x+b)/(c*x+d),"=",(e*x+f)/(g*x+h)," équivalant à ",n,"=",0),
loop));

6^8;